*::after, *::before {
  box-sizing: border-box;
}

*{
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: #0f222f;
}

.slideshow {
  position: relative;
  width: 400px;
  height: 400px;
  transform-style: preserve-3d;
  perspective: 1000px;
}

.slideshow .slide {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: start;
  align-items: start;
  transform: rotateY(270deg);
  animation: animate 20s linear infinite;
  animation-delay: calc(var(--i) * 2s);
  transform-style: preserve-3d;
}

@keyframes animate {
  0% {
    transform: rotateY(270deg);
  }
  10%, 100% {
    transform: rotateY(90deg);
  }
}

.slideshow .slide img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 20px;
}

.slideshow .slide h2 {
  position: relative;
  z-index: 1000;
  color: #FFF;
  font-size: 10em;
  transform: rotateY(180deg) translateY(100px) translateZ(50px);
  transform-style: preserve-3d;
  backface-visibility: hidden;
  font-weight: 900;
  -webkit-text-stroke: 1px #000;
}

.slideshow .slide h2 span {
  position: absolute;
  top: 50%;
  left: 0;
  font-size: .5em;
  font-weight: 500;
  transform: translate(0, 50%) translateZ(50px);
  backface-visibility: hidden;
}